package com.insigma.gwy.utils;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

public class ListToHashMap {

	
	public static HashMap<String, String> getHashMap(List<Map<String, String>> list,String key,String value) {
		
		LinkedHashMap<String, String> hashMap = new LinkedHashMap<String, String>();

		for(int i = 0;i<list.size();i++) {
			
			Map<String, String> map = list.get(i);
			
			String keyString = map.get(key);
			
			String valString = map.get(value);
			
			hashMap.put(keyString, valString);
		}
		
		return hashMap;
	}
}
